<?php

	$NewUserDefaultRole =$advancedsettings['NewUserDefaultRole'];
	switch($NewUserDefaultRole)
	{
      case 5: $NewUserDefaultRole ='<option value="69">Subscriber</option>
              <option value="34">Author</option>
              <option value="5" selected="selected">Admin</option>';
              break;
      case 34: $NewUserDefaultRole ='<option value="69">Subscriber</option>
              <option value="34" selected="selected">Author</option>
              <option value="5" >Admin</option>';
              break;
      case 69: $NewUserDefaultRole ='<option value="69" selected="selected">Subscriber</option>
              <option value="34">Author</option>
              <option value="5" >Admin</option>';
              break;                
       default:  $NewUserDefaultRole ='<option value="69" selected="selected">Subscriber</option>
              <option value="34">Author</option>
              <option value="5" >Admin</option>';
              break;
              
      }           
          
	
	if($advancedsettings['ShowCategories']) 	
		$ShowCategories ="checked= \"checked\" ";
	else  
		$ShowCategories =" ";
		
	
	if($advancedsettings['ShowCategories']) 	
		$ShowCategories ="checked= \"checked\" ";
	else  
		$ShowCategories =" ";
	
	if($advancedsettings['ShowArchives']) 	
		$ShowArchives ="checked= \"checked\" ";
	else  
		$ShowArchives =" ";
		
	if($advancedsettings['ShowCommentsShort']) 	
		$ShowCommentsShort ="checked= \"checked\" ";
	else  
		$ShowCommentsShort =" ";
	
	if($advancedsettings['ShowCommentsFull']) 	
		$ShowCommentsFull ="checked= \"checked\" ";
	else  
		$ShowCommentsFull =" ";	
	
	if($advancedsettings['ShowAuthorName']) 	
		$ShowAuthorName ="checked= \"checked\" ";
	else  
		$ShowAuthorName =" ";
	
	if($advancedsettings['ShowDate']) 	
		$ShowDate ="checked= \"checked\" ";
	else  
		$ShowDate =" ";
		
	if($advancedsettings['ShowPermanentLink']) 	
		$ShowPermanentLink ="checked= \"checked\" ";
	else  
		$ShowPermanentLink =" ";
	
	if($advancedsettings['ShowSocialSiteLinks']) 	
		$ShowSocialSiteLinks ="checked= \"checked\" ";
	else  
		$ShowSocialSiteLinks =" ";
	
	if($advancedsettings['ShowPostedIn']) 	
		$ShowPostedIn ="checked= \"checked\" ";
	else  
		$ShowPostedIn =" ";
	
	if($advancedsettings['ShowAuthorPic']) 	
		$ShowAuthorPic ="checked= \"checked\" ";
	else  
		$ShowAuthorPic =" ";
	
	if($advancedsettings['ShowMeta']) 	
		$ShowMeta ="checked= \"checked\" ";
	else  
		$ShowMeta =" ";
	
	if($advancedsettings['RemoveCopyright']) 	
		$RemoveCopyright ="checked= \"checked\" ";
	else  
		$RemoveCopyright =" ";
	
	if($advancedsettings['EnableTemplateEditing']) 	
		$EnableTemplateEditing ="checked= \"checked\" ";
	else  
		$EnableTemplateEditing =" ";
	
	if($advancedsettings['SendMailToNewUsers']) 	
		$SendMailToNewUsers ="checked= \"checked\" ";
	else  
		$SendMailToNewUsers =" ";
	
	if($advancedsettings['SendMailErrorMessage']) 	
		$SendMailErrorMessage ="checked= \"checked\" ";
	else  
		$SendMailErrorMessage =" ";
	
	if($advancedsettings['SendRegistrationTopic']) 	
		$SendRegistrationTopic ="checked= \"checked\" ";
	else  
		$SendRegistrationTopic =" ";
	
	
		
	if($advancedsettings['ShowZeroPostMonths']) 	
		$ShowZeroPostMonths ="checked= \"checked\" ";
	else  
		$ShowZeroPostMonths =" ";
  
  
$attributes = array('class' => 'advancedsettings', 'id' => 'advancedsettings');
echo form_open('admin/AdvancedSettings/', $attributes);
echo "<div class=\"error\" >".$this->validation->error_string."</div>"; ?>

<table width="100%" border="0">
 <caption>Advanced Settings</caption>
  <tr>
      <td>New User Default Role</td>
      <td><select name="NewUserDefaultRole" id="NewUserDefaultRole">
       <?=$NewUserDefaultRole?>
            </select></td>
  </tr>
    <tr>
      <td width="37%">Show Categories</td>
      <td><input type="checkbox" name="ShowCategories" id="ShowCategories" value="1" <?=$ShowCategories?> /></td>
    </tr>
    <tr>
      <td>Show Archives</td>
      <td><input type="checkbox" name="ShowArchives" id="ShowArchives" value="1" <?=$ShowArchives?> /></td>
    </tr>
    
    
    <tr>
      <td>Send Mail To New Users</td>
      <td><input type="checkbox" name="SendMailToNewUsers" id="SendMailToNewUsers" value="1" <?=$SendMailToNewUsers?> /></td>
    </tr>
    
    <tr>
      <td>Send Registration Message</td>
      <td><input type="checkbox" name="SendRegistrationTopic" id="SendRegistrationTopic" value="1" <?=$SendRegistrationTopic?> /></td>
    </tr>
    <tr>
      <td>Number Of Posts Home</td>
      <td><input type="text" name="NumberOfPostsHome" id="NumberOfPostsHome" value="<?=$advancedsettings['NumberOfPostsHome']?>" /></td>
    </tr>
    <tr>
      <td>Number of Posts Archives</td>
      <td><input type="text" name="NumberofPostsArchives" id="NumberofPostsArchives" value="<?=$advancedsettings['NumberofPostsArchives']?>" /></td>
    </tr>
    
    <tr>
      <td>&nbsp;</td>
      <td><?=form_submit("save", "Save!")?>&nbsp;<?=form_reset("reset","Reset")?></td>
    </tr>
    <tfoot>
				<tr>
					<th scope=\"row\">&nbsp;</th>

					<td >&nbsp;</td>
				</tr>
			</tfoot>
  </table>

<?=form_close()?>
<!--<tr>
      <td>Send Mail Error Message</td>
      <td><input type="checkbox" name="SendMailErrorMessage" id="SendMailErrorMessage" value="1" < ?=$SendMailErrorMessage?> /></td>
    </tr>
    <tr>
      <td>Show Zero Post Months</td>
      <td><input type="checkbox" name="ShowZeroPostMonths"  id="ShowZeroPostMonths" value="1" < ?=$ShowZeroPostMonths?> /></td>
    </tr>
    <tr>
      <td>Show Comments Short</td>
      <td><input type="checkbox" name="ShowCommentsShort" id="ShowCommentsShort" value="1" < ?=$ShowCommentsShort?> /></td>
    </tr>
    <tr>
      <td>Show Comments Full</td>
      <td><input name="ShowCommentsFull" type="checkbox" id="ShowCommentsFull" value="1" < ?=$ShowCommentsFull?> /></td>
    </tr>
    <tr>
      <td>Show Author Name</td>
      <td><input type="checkbox" name="ShowAuthorName" id="ShowAuthorName" value="1" < ?=$ShowAuthorName?> /></td>
    </tr>
    <tr>
      <td>Show Date</td>
      <td><input type="checkbox" name="ShowDate" id="ShowDate" value="1" < ?=$ShowDate?> /></td>
    </tr>
    <tr>
      <td>Show Permanent Link</td>
      <td><input type="checkbox" name="ShowPermanentLink" id="ShowPermanentLink" value="1" < ?=$ShowPermanentLink?> /></td>
    </tr>
    <tr>
      <td>Show Social Site Links</td>
      <td><input type="checkbox" name="ShowSocialSiteLinks" id="ShowSocialSiteLinks" value="1" < ?=$ShowSocialSiteLinks?> /></td>
    </tr>
    <tr>
      <td>Show Posted In</td>
      <td><input type="checkbox" name="ShowPostedIn" id="ShowPostedIn" value="1" < ?=$ShowPostedIn?> /></td>
    </tr>
    <tr>
      <td>Show Author Pic</td>
      <td><input type="checkbox" name="ShowAuthorPic" id="ShowAuthorPic" value="1" < ?=$ShowAuthorPic?> /></td>
    </tr>
    <tr>
      <td>Show Meta</td>
      <td><input type="checkbox" name="ShowMeta" id="ShowMeta" value="1" < ?=$ShowMeta?> /></td>
    </tr>
    <tr>
      <td>Remove Copyright</td>
      <td><input type="checkbox" name="RemoveCopyright" id="RemoveCopyright" value="1" < ?=$RemoveCopyright?> /></td>
    </tr>
    <tr>
      <td>Enable Template Editing</td>
      <td><input type="checkbox" name="EnableTemplateEditing" id="EnableTemplateEditing" value="1" < ?=$EnableTemplateEditing?> /></td>
    </tr> -->